package com.cnfangmao.masterdata.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @description: Controller Demo
 * @author: chenxc
 * @date: 2020年4月9日 上午12:14:27
 */

@ApiIgnore
@Api(description="DemoController相关的api",value="xxx", tags="yyy",produces="ccc",consumes="zzz")
@RestController
@RequestMapping("/demo")
public class DemoController {
	
	@Value("${server.port}")
	private String port;
	
	/**
	 * @description: TODO 
	 * @author: chenxc
	 * @date: 2020年4月14日 下午11:47:42
	 * @param: @param cstId
	 * @param: @return      
	 * @return: String      
	 * @throws
	 */
	@ApiOperation(value="根据cstId查询客户信息" ,notes = "查询数据库中某个客户信息")
    @ApiImplicitParam(name="cstId",value="客户Id",paramType="query",required = true,dataType = "int")
	@GetMapping(path="/find-by-id")
	public String findById(@RequestParam("cstId") String cstId){
		return String.format("hellow, %s：%s", cstId, this.port);
	}
}
